import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../components/views/HomeView.vue'
import PaymentView from '../components/views/PaymentView.vue'
import HistoryView from '../components/views/HistoryView.vue'
import FileDetailsView from '../components/views/FileDetailsView.vue'
import DetectView from '../components/views/DetectView.vue'
import LoginView from '../components/views/LoginView.vue';
import InvitationCodeManagementView from '../components/views/InvitationCodeManagementView.vue'
// 导入文件管理页面组件
import FileManagementView from '../components/views/FileManagementView.vue';
import UserManagementView from '../components/views/UserManagementView.vue';
import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs'

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView
    },
    {
        path: '/payment',
        name: 'payment',
        component: PaymentView
    },
    {
        path: '/history',
        name: 'history',
        component: HistoryView
    },
    {
        path: '/file-details',
        name: 'fileDetails',
        component: FileDetailsView
    },
    {
        path: '/detect',
        name: 'detect',
        component: DetectView
    },
    {
        path: '/login',
        name: 'login',
        component: LoginView
    },
    {
        path: '/invitation-code-management',
        name: 'invitation-code-management',
        component: InvitationCodeManagementView
    },
    // 添加文件管理页面的路由配置
    {
        path: '/file-management',
        name: 'FileManagement',
        component: FileManagementView
    },
    // 添加用户管理页面的路由配置
    {
        path: '/user-management',
        name: 'UserManagement',
        component: UserManagementView
    }

]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router